//
//  MitSPaJLCFMineListCellSYnAJW.m
//  Jlcf_ios
//
//  Created by Ji on 2018/9/26.
//  Copyright © 2018 ski. All rights reserved.
//

#import "MitSPaJLCFMineListCellSYnAJW.h"

@interface MitSPaJLCFMineListCellSYnAJW ()
{
    NSString *_imgName;
    NSString *_jsifqPtitleStrphUVlL;
    NSInteger _row;
}

@property (nonatomic, strong) UIImageView *img;

@property (nonatomic, strong) UILabel *titleLabel;

@property (nonatomic, strong) UIView *line;

@end

@implementation MitSPaJLCFMineListCellSYnAJW

- (void)setWithRow:(NSInteger)row imgName:(NSString *)imgName jsifqPtitleStrphUVlL:(NSString *)jsifqPtitleStrphUVlL {
    _row = row;
    _imgName = imgName;
    _jsifqPtitleStrphUVlL = jsifqPtitleStrphUVlL;
}

- (void)reloadData
{
    self.backgroundColor = QTZ_White;
    if (!self.img) {
        self.img = [[UIImageView alloc] init];
        [self addSubview:self.img];
    }
    
    if (self.img) {
        self.img.image = [UIImage imageNamed:_imgName];
        [self.img sizeToFit];
        self.img.centerY = 24;
        self.img.left = 24;
    }
    
    if (!self.titleLabel) {
        self.titleLabel = [UILabel new];
        self.titleLabel.textColor = QTZ_Gray51;
        self.titleLabel.font = FONT(11);
        [self addSubview:self.titleLabel];
    }
    
    if (self.titleLabel) {
        self.titleLabel.text = _jsifqPtitleStrphUVlL;
        [self.titleLabel sizeToFit];
        self.titleLabel.left = self.img.right + 23;
        self.titleLabel.centerY = self.img.centerY;
    }
    
    if (!self.line) {
        self.line = [[UIView alloc] initWithFrame:CGRectMake(24, 46, FULL_WIDTH - 24 - 51, .5f)];
        self.line.backgroundColor = QTZ_Gray237;
        [self addSubview:self.line];
    }
    
    if (self.line) {
        self.line.hidden = _row == 7;
    }
    
    
}

@end
